<template>
  <div class="hello">
    {{data}}
  </div>
</template>

<script setup>
import axios from 'axios'
import { ref } from 'vue'

const data = ref('data')
const resData = await axios('http://127.0.0.1:8081/test')
if (resData.data.code === 0) {
  data.value = resData.data.data
}
</script>

